﻿using Client.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;

namespace Client.HelpTools
{
    public class DataGridTemplateSelector : DataTemplateSelector
    {
        public DataTemplate Template1 { get; set; }

        public DataTemplate Template2 { get; set; }

        public override DataTemplate SelectTemplate(object item, DependencyObject container)
        {
            var stu = (SetUpModel)item;
            if (stu.DatabaseName=="")
                return Template1;
            else
                return Template2;
        }
    }
}
